/*
 *  $Id: DragonSlayer.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *  This file is a part of Ragima CCG.
 *  (C) 2008 Ragima development group.
 *
 *  Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Darkness.Creatures {
    public class DragonSlayer: CreatureCard {
        public DragonSlayer(): base("001_d_c_dragon_slayer") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Darkness;
            Damage = 5;
            Health = 6;
            Value = 100;
            AddManaCost(ElementType.Darkness, 5);
            AddManaCost(ElementType.Air, 2);
        }
        public override void SetNaturalAffects(ICollector<Affect> affects) {
            affects.Add(new Affects.OnHit(DoHit, AffectSummaryType.Local));
        }

        private static void DoHit(Creature hitter, AbstractObject target, int damage) {
            if (target.MaxHealth > 6)
                target.Summary.ChangeMaxHealth(-damage);
        }
    }
}
